/************************************************************
 * Copyright (c) 2010 Georg Fritzsche
 *
 * This project is licensed under the "New BSD License": 
 * http://www.opensource.org/licenses/bsd-license.php
 ***********************************************************/

#ifndef TRIGGER_TRACK_H
#define TRIGGER_TRACK_H

#include <string>
#include <memory>
#include <boost/shared_ptr.hpp>
#include <boost/noncopyable.hpp>

#include "audio_system.h"


namespace FMOD {
    class Sound;
    class Channel;
}


class Track : boost::noncopyable
{
  public:
    Track(const std::string& path, const boost::shared_ptr<AudioSystem>& system, bool stream);
	~Track();

	void play();
	void stop() const;

    const std::string& title() const;

  private:
	std::string m_path;
	std::string m_title;
    AudioSystem::SoundPtr m_sound;
	AudioSystem::ChannelPtr m_channel;
    const boost::shared_ptr<AudioSystem> m_system;
};

#endif
